Chapter 24
Upgrading From
Lasso WDE 3.x

[p]This chapter contains important information for users of Lasso Web Data Engine 3.x who are upgrading to Lasso Professional 8. Please read through this chapter before attempting to run solutions in Lasso Professional 8 that were originally developed for an earlier version of Lasso. [/p]

[p]The upgrading chapters are cumulative so this chapter should be read in conjunction with the preceding chapters for full information about changes to Lasso. [/p]

[p]Topics in this chapter include: [/p]

[p]This chapter does not attempt to cover every issue that users of versions of Lasso prior to Lasso Web Data Engine 3.x may encounter. [/p]

Introduction

[p]This chapter includes the upgrading instructions from Lasso Web Data Engine 3.x to Lasso Professional 5. If a site is being upgraded from Lasso Web Data Engine 3.x the items in this chapter should be applied first, then the items in the preceding upgrading chapters. [/p]

[p]Sites that are upgraded from Lasso Web Data Engine 3.x to Lasso Professional 8 will in general require significant modifications. [/p]

Lasso Studio and Lasso Updater

[p]Lasso Studio includes a Lasso Updater that can be used on code from earlier versions of Lasso to bring it into compliance with the latest version of Lasso. See the documentation for Lasso Studio for more information. [/p]

Syntax Changes

[p]Lasso Professional 8 introduces changes to some of the core syntax rules of Lasso. Some of these changes may require you to rewrite portions of your existing Lasso-based solutions. This section describes each change, why it was made and how to update existing Lasso pages. [/p]

Table 1: Syntax Changes

[table][tr][th]Syntax Change[/th][th]Description[/th][th] [/th][/tr]

[tr][td]Square Brackets[/td][td]All expressions in square brackets are now interpreted. [/td][/tr]

[tr][td]Commas[/td][td]Commas are no longer allowed after tag names. [/td][/tr]

[tr][td]Keywords[/td][td]Keyword names now always begin with a hyphen. [/td][/tr]

[tr][td]Encoding Keywords[/td][td]The default is to HTML encode outermost substitution tags and apply no encoding to nested sub-tags. [/td][/tr]

[tr][td]Else If[/td][td]The [Else:If] tag is no longer supported. The [Else] tag has been enhanced to provide the same functionality. [/td][/tr]

[tr][td]Include[/td][td]The [Include] tag now returns an error if the specified file does not exist. [/td][/tr]

[tr][td]Post Inline[/td][td]The [Post_Inline] tag has been replaced by a new scheduling facility accessed through the [Event_Schedule] tag. [/td][/tr]

[tr][td]SQL Inline[/td][td]The [SQL_Inline] tag has been replaced by a new -SQL command tag which can be used in a normal [Inline] tag. [/td][/tr]

[tr][td]File Tags and Logging[/td][td]The new distributed architecture means these tags work only on files accessible by Lasso Service. [/td][/tr]

[tr][td]Line Endings[/td][td]The default line endings on Mac OS X are different from those for Mac OS 9. [/td][/tr]

[tr][td]JavaScript[/td][td]Special care must be taken to ensure that array references in JavaScript are not interpreted by Lasso. [/td][/tr]

[tr][td]Macros[/td][td]Macros are no longer supported. Much of their functionality can be achieved through custom tags. [/td][/tr]

[tr][td]Numeric Literals[/td][td]Numeric literals must not be written with quotes. The conversion of strings to numeric values has changed. [/td][/tr]

[tr][td]Mathematical Precision[/td][td]Precision is handled automatically by the new mathematical expressions and symbols and can be set explicitly using [Decimal->SetFormat] tag. [/td][/tr]

[tr][td]Double Quotes[/td][td]Single quotes are preferred for designating string literals. [/td][/tr]

[tr][td]Restrictions[/td][td]Restrictions on maximum values for math operations and looping tags have been eased. [/td][/tr]

[/table]

Square Brackets

[p]In earlier versions of Lasso, only tag names which were recognized by Lasso would be interpreted. In Lasso Professional 8, all square bracketed expressions are interpreted whether they contain a valid Lasso tag or not. This allows expressions and member tags to be used within square brackets and allows custom tags to be used. [/p]

[p]For example, the following expressions would all have been ignored in earlier versions of Lasso, but will be interpreted as indicated by Lasso Professional 8. [/p]

[pre][45] 45
[1 + 2] 3
[blue] blue
['aqua' + 'marine'] aquamarine [/pre]

[p]If square brackets are used decoratively on a page, e.g. to surround link names, they will be stripped out by Lasso Professional 8. [/p]

[note][b]Note: [/b]See the section on JavaScript that follows for tips on using square brackets within client-side JavaScript contained in a Lasso page. [/note]

To update existing sites:

[p]There are several options to update existing sites depending on how the square brackets are being used on a page. [/p]

[pre]<a href="default.lasso"> &#91; Home &#93; </a> [/pre]

[pre]<a href="default.lasso"> [String: '[Home]'] </a> [/pre]

[pre]<a href="default.lasso"> ['[Home]'] </a> [/pre]

  1. [note][b]Note: [/b]Any string literals which are output in this way should always be surrounded by single quotes, otherwise there is a danger that they might be interpreted as a tag. [/note]

[pre][Define_Tag: 'Bracket']
[Return: (Params->(Get: 1)]
[/Define_Tag] [/pre]

[pre]<a href="default.lasso">
</a> [/pre]

Commas

[p]In earlier versions of Lasso, commas could optionally be used following the tag name, before any parameters of the tag. Although this syntax hasn’t been recommended for some time there are still examples of it in the Lasso Web Data Engine 3.x documentation and in some Lasso-based Web sites. The following example shows the tag construct with a comma following the tag name. [/p]

[pre][Tag_Name, Parameters] (No longer supported) [/pre]

[p]This syntax was particularly common with tags that took only a single keyword. For example, both of the following tags were commonly written with a comma following the tag name. [/p]

[pre][Server_Date, Short] (No longer supported)
[Error_CurrentError, ErrorCode] (No longer supported) [/pre]

[p]Using a colon after the tag name is now mandatory in Lasso Professional 8. This change was made in order to facilitate parsing of more complex expressions. The tag examples above must now be written as follows with a colon after the tag name. The following example also demonstrates the new method of specifying keyword names with a leading hyphen. [/p]

[pre][Server_Date: -Short]
[Error_CurrentError: -ErrorCode] [/pre]

To update existing sites:

[p]Use a regular expression to correct Lasso pages that contain the older comma syntax. Most text editors and Web authoring environments can perform a find/replace using regular expressions. [/p]

  1. Search for the following regular expression pattern to find tags in square brackets which have a comma after the tag name:

[pre][([A-Za-z_]+),([^]]*)] [/pre]

[pre][1:2] [/pre]

  1. Search for the following regular expression pattern to find sub-tags in parentheses which have a comma after the tag name:

[pre](([A-Za-z_]+),([^)]*)) [/pre]

[pre](1:2) [/pre]

[p]What the first regular expression does is search for a square bracket followed by a tag name, a comma, then any characters up until the closing square bracket. The replacement pattern inserts an opening square bracket, the tag name, a colon, the contents after the comma, and a final closing square bracket. The second regular expression performs the same steps with parentheses instead of square brackets. [/p]

Keywords

[p]All keywords and keyword/value parameters (formerly named parameters) start with a hyphen in Lasso 8. This used to be an option for command tags used within the [code][Inline][/code] tag in Lasso Web Data Engine 3.x, but is now required for all tags. Most tags which were supported in Lasso Web Data Engine 3.x will continue to accept keywords without the leading hyphen so Lasso Web Data Engine 3.x solutions do not need to be rewritten. However, all keyword names without leading hyphens have been deprecated and are not guaranteed to work in future versions of Lasso. [/p]

[p]This change was made so that Lasso keywords can be clearly differentiated from user-defined name/value parameters and from tag names. This becomes especially important as users start to create custom tags which might have the same name as the keywords of existing tags. [/p]

To update existing sites:

  1. Locate all keyword names that do not begin with a hyphen. For example, the following [code][Server_Date][/code] tag contains both a tag-specific keyword and an encoding keyword, neither of which has been written with a hyphen:

[pre][Server_Date: Short, EncodeNone] [/pre]

[pre][Inline:
Database='Contacts',
Table='People',
'State'='WA',
Search] [/pre]

  1. Change the keywords so their names start with a hyphen. The [code][Server_Date][/code] tag is changed to the following with each keyword name beginning with a hyphen:

[pre][Server_Date: -Short, -EncodeNone] [/pre]

[pre][Inline:
-Database='Contacts',
-Table='People',
'State'='WA',
-Search] [/pre]

  1. Do not change user-defined name/value parameters. In the preceding example [code]'State'='WA'[/code] is not changed when updating the tag for compliance with Lasso Professional 8.

[note][b]Note: [/b]The name ‘State’ has quotes around it in the preceding examples. All string literals should be specified with single quotes. This ensures that they will not be misidentified as a sub-tag or a keyword. [/note]

Encoding Keywords

[p]The use of encoding keywords in substitution tags has been altered in Lasso Professional 8. All substitution tags which are used as sub-tags now have a default encoding of [code]-EncodeNone[/code]. Only the outermost substitution tag (i.e. a tag in square brackets) has a default encoding of [code]-EncodeHTML[/code]. This change was made in order to make Lasso easier to use for new users and to reduce the length of nested tag expressions. [/p]

[p]The following example demonstrates the benefits of the new Lasso Professional 8 syntax. In Lasso 3, the following [code][String_Concatenate][/code] tag contains many sub-tag parameters which all have [code]EncodeNone[/code] specified. [/p]

[pre][String_Concatenate:
(Field: 'First_Name', EncodeNone), ' ',
(Field: 'Middle_Name', EncodeNone), ' ',
(Field: 'Last_Name', EncodeNone)] [/pre]

[p]The preceding tag can be written as follows in Lasso 8. Since the default encoding of each of the sub-tags is [code]-EncodeNone[/code] the encoding keyword can be omitted. The resulting code is considerably shorter and easier to read. [/p]

[pre][String_Concatenate: (Field: 'First Name'), ' ',
(Field: 'Middle Name'), ' ', (Field: 'Last Name')] [/pre]

[p]The default encoding for the outermost tag in Lasso 8 is still [code]-EncodeHTML[/code] in order to maintain the security of sites powered by Lasso Professional 8. If a field is placed on a page without encoding then any JavaScript or HTML that the code contains will be live on the Web page. Only HTML from trusted sources should be allowed on your Web site. [/p]

[p]Lasso 8 includes additional encoding enhancements. Please see the Encoding chapter for full details of how [code][Encode_Set] [/code]can be used to change the default encoding of a page and more. [/p]

[note][b]Note: [/b]-EncodeHTML is now a valid encoding keyword which performs the same encoding as that which is performed if no encoding keyword is specified in an outermost substitution tag. [/note]

To update existing sites:

[p]Encoding keywords still work as they did in Lasso Web Data Engine 3.x if they are specified in every tag. Existing code will generally work after an upgrade to Lasso Professional 8. However, the following use of encoding keywords will need to be rewritten. [/p]

  1. Locate tags where the outermost tag has an [code]EncodeNone [/code]encoding keyword and the sub-tags do not have any encoding keywords. For example, the following [code][String_Concatenate][/code] tag has an [code]EncodeNone [/code]keyword and the two [code][Field][/code] tags do not have any encoding keywords.

[pre][String_Concatenate: EncodeNone, (Field: 'First Name'), ' ', (Field: 'Last Name')] [/pre]

  1. Rewrite the tag by removing the [code]EncodeNone [/code]keyword from the outermost tag. In the resulting Lasso 8 code, no encoding keywords are required.

[pre][String_Concatenate: (Field: 'First Name'), ' ', (Field: 'Last Name')] [/pre]

  1. [note][b]Note: [/b]In the Lasso 3 code, the[code] [Field][/code] sub-tags were automatically HTML encoded. The [code]EncodeNone [/code]keyword in the outermost[code] [String_Concatenate] [/code]tag ensured that double encoding was not applied. Since Lasso 7 does not encode sub-tags by default, the encoding keyword is no longer needed. [/note]

Else If

[p]The [code][Else:If:][/code] tag has been eliminated as a distinct tag, but the concept is still supported. [code][Else:If: Condition][/code] is now syntactically equivalent to [code][Else: (If: Condition)][/code] and the [code][Else][/code] and [code][If][/code] tags have been enhanced so that much of the old behavior of the[code] [Else:If:][/code] tag is preserved. [/p]

[p]The following [code][Else:If:][/code] tag will not work as expected in Lasso Professional 8 because the condition will be misinterpreted: [/p]

[pre][Else:If: 'abc' == 'abc'] [/pre]

[p]The condition will be interpreted as if the following tag had been written: [/p]

[pre][Else: (If: 'abc') == 'abc'] [/pre]

[p]The [code](If: 'abc')[/code] expression will return [code]True[/code] and this will be compared to [code]'abc'[/code]. Since [code]True [/code]is not equal to [code]'abc'[/code] this clause in the conditional will not be executed. [/p]

[note][b]Note: [/b]If called individually, the [code][If][/code] and [code][Else] [/code]tags will return the value of the specified conditional expressions parameter rather than returning an error about an unclosed container tag. [/note]

To update existing sites:

[pre][Else:If: ('abc' == 'abc')] [/pre]

[pre][Else: 'abc' == 'abc'] [/pre]

Include

[p]The[code] [Include][/code] tag now validates whether the specified file exists and returns an error if an invalid file path is specified. This means that programmatically constructed [code][Include][/code] statements need to take a precaution so errors won’t be shown to the site visitor. [/p]

To update existing sites:

[p]The [code][Protect] … [/Protect] [/code]tags can be used to suppress the error that is reported by the [code][Include] [/code]tag. The following code will not return an error, even though the file [code]fake.lasso [/code]does not exist. [/p]

[pre][Protect]
[Include: 'fake.lasso']
[/Protect] [/pre]

Post Inline

[p]The [code][Post_Inline][/code] tag is no longer supported in Lasso Professional 8. This tag relied on access to files which Lasso Service might not be able to locate because they could be on a separate machine. The replacement for [code][Post_Inline][/code] is called[code] [Event_Schedule][/code] and has the following format: [/p]

[pre][Event_Schedule:
-Start=(Date, Defaults to Today),
-End=(Date, Defaults to Never),
-URL=(URL to Execute, Required)
-Repeat=(True/False, Defaults to True if -Delay is set and False otherwise),
-Restart=(True/False, Defaults to True),
-Delay=(Minutes, Required if -Repeat is True),
-Username=(Username for Authentication, Optional),
-Password=(Password for Authentication, Optional)] [/pre]

[p]This tag schedules the execution of the response URL at a specific start date and time. The URL is fetched just as if a client had visited it through a Web browser. After the task is performed, it is optionally repeated a specified number of minutes later until the end date and time is reached. If the restart parameter is set to [code]True[/code] then the repeating task will be rescheduled even after server restarts. Please see the Control Tags chapter for complete documentation of the syntax of [code][Event_Schedule][/code]. [/p]

To update existing sites:

[p]Sites that rely on[code] [Post_Inline][/code] tags will need to be rewritten. The following steps must be taken: [/p]

  1. Determine the URL of the post-inline response page you were calling.
  1. Change the initial [code][Post_Inline][/code] tag to the equivalent [code][Event_Schedule][/code] tag using date calculations if necessary to determine the start date and time.
  1. If the [code][Post_Inline][/code] tag rescheduled itself in the response page then either the rescheduling call must be changed to an equivalent [code][Event_Schedule][/code] tag or the automatic repeat feature of [code][Event_Schedule][/code] can be used in its place.

SQL Inline

[p]The [code][SQL_Inline][/code] tag is no longer supported in Lasso Professional 8. This tag has been replaced by a more versatile [code]-SQL[/code] command tag that can be used as the database action within any [code][Inline][/code] tag. [/p]

[pre][Inline: -SQL='…SQL Statement…]
… Inline Results …
[/Inline] [/pre]

[p]The [code]-SQL[/code] command tag can be used to issue SQL statements to the included Lasso MySQL data source or to any MySQL data source accessed through the Lasso Connector for MySQL. The [code]-SQL[/code] command tag may also be supported by third party data source connectors. Please see the MySQL Data Sources chapter for more information about using this tag. [/p]

To update existing sites:

[p]Sites that rely on[code] [SQL_Inline][/code] tags will need to be rewritten. The following steps must be taken: [/p]

  1. Change the opening and closing [code][SQL_Inline] … [/SQL_Inline][/code] tags to [code][Inline] … [/Inline][/code] tags. For example, following is a [code][SQL_Inline] [/code]that searches the [code]People [/code]table of the [code]Contacts [/code]database.

[pre][SQL_Inline: Datasource='Contacts',
SQLStatement='SELECT First_Name, Last_Name from People']

[/SQL_Inline] [/pre]

[pre][Inline: Datasource='Contacts',
SQLStatement='SELECT First_Name, Last_Name from People']

[/Inline] [/pre]

  1. Change the [code]Datasource [/code]parameter to a [code]-Database[/code] keyword/value parameter. Ensure that the database name is valid in the current Lasso Professional 8 setup.

[pre][Inline: -Database='Contacts',
SQLStatement='SELECT First_Name, Last_Name from People']

[/Inline] [/pre]

  1. [note][b]Note: [/b]The ODBC data source module is not provided with Lasso Professional 8. Data sources must be available through the included Lasso Connector for MySQL or a third-party data source connector. [/note]
  1. Change the [code]SQLStatement [/code]parameter to a [code]-SQL[/code] command tag. Change any table references within the SQL statement so they reference both the database and table name, not just the table name.

[pre][Inline: -Database='Contacts',
-SQL='SELECT First_Name, Last_Name from Contacts.People']

[/Inline] [/pre]

  1. If Lasso tags are used within the SQL statement then they will need to be changed to expressions. In the following example, the name of the table is stored in a variable named [code]MyTable[/code] and referenced using a square bracketed expression within the [code]SQLStatement[/code]. This is no longer valid syntax.

[pre][Var_Set: 'MyTable'='People']
[SQL_Inline: Datasource='Contacts',
SQLStatement='SELECT First_Name, Last_Name from [Var: 'MyTable']']

[/SQL_Inline] [/pre]

[pre][Variable: 'MyTable'='Contacts.Table']
[Inline: -Database='Contacts',
-SQL='SELECT First_Name, Last_Name from ' + (Variable: 'MyTable')]

[/Inline] [/pre]

[p]Please see the MySQL Data Sources chapter for more examples of creating SQL statements for use with the [code]-SQL[/code] command tag and for information about how to display the results within the [code][Inline] … [/Inline][/code] tags. [/p]

File Tags and Logging

[p]Lasso Professional 8 features a distributed architecture where Lasso Service can run on a different machine from the Web server on which Lasso Connector for IIS or Lasso Connector for Apache is installed. The file tags and logging tags can only manipulate files on the machine which is hosting Lasso Service. They have no access to the machine which is hosting a Lasso Web server connector. [/p]

[p]If you are running both Lasso Service and your Web serving software on a single machine then no changes to existing file and logging tags should be necessary when you upgrade to Lasso Professional 8. Otherwise, please consult the Files and Logging chapter for more information about how to access files in a two machine system. [/p]

[note][b]Note: [/b]In contrast to the file and logging tags, the [code][Include][/code] tag works exclusively with files from the Web serving machine. No changes should be necessary to your sites which use the [code][Include][/code] tag unless you are using it to access log files or files which have been manipulated by the file tags. Use the [code][File_Read][/code] tag for these situations. [/note]

Line Endings

[p]Files created in Mac OS X, Windows 2000, or versions of the Mac OS 9 and earlier each have a different standard for line endings. This can cause confusion when moving files from one platform to another or from an earlier version of the Mac OS to Mac OS X. Table 11: Line Endings summarizes the different standards. [/p]

Table 2: Line Endings

[table][tr][th]Tag[/th][th]Description[/th][th] [/th][/tr]

[tr][td]Mac OS X[/td][td]Line feed: n. Each line is ended with a single line feed character. [/td][/tr]

[tr][td]Mac OS 9 and Earlier[/td][td]Carriage return: r. Each line is ended with a single carriage return character. [/td][/tr]

[tr][td]Windows 2000[/td][td]Line feed and carriage return: rn. Each line is ended with both a line feed and a carriage return character. [/td][/tr]

[/table]

[p]Line ending differences are handled automatically by Web servers and Web browsers so are generally only a concern when reading and writing files using the[code] [File_…] [/code]tags. The following tips make working with files from different platforms easier. [/p]

[pre][File_LineCount: 'FileName.txt', -FileEndOfLine='r'] [/pre]

[pre][File_LineCount: 'FileName.txt', -FileEndOfLine='rn'] [/pre]

JavaScript

[p]Since Lasso will interpret any expressions contained within square brackets special care must be taken to ensure that square brackets which are used for array accesses within client-side JavaScripts are not interpreted. [/p]

[pre][NoProcess]
<script language="JavaScript">
… JavaScript Expressions …
</script>
[/NoProcess] [/pre]

[pre]<script language="JavaScript">
<!--
… JavaScript Expressions …
// -->
</script> [/pre]

[pre]<script language="JavaScript">
<!--
… JavaScript Expressions …
// -->
var VariableName='[… Lasso Expression …]';
<!--
… JavaScript Expressions …
// -->
</script> [/pre]

[pre]<select name="Select" multiple size="4"
onChange="[String: 'alert(this.options[this.selectedIndex])']">
<option value="Value"> Value </option>

</select> [/pre]

Macros

[p]Macros are not supported in Lasso Professional 8. See the Extending Lasso Guide for information about rewriting macros as custom tags using the new[code] [Define_Tag] [/code]tag in Lasso 8. [/p]

Numeric Literals

[p]In Lasso 8 there is a distinction between number values and string values. This distinction makes advanced data type specific member tags and expression symbols possible. Strings are always enclosed in single quotes. Numbers are never enclosed in quotes. If you use quotes around a numeric literal then symbols which are used to manipulate that literal may assume it is a string. [/p]

[p]For example, the following code specifies a mathematical operation, the numerical addition of [code]1 [/code]and [code]2[/code]: [/p]

[pre][1 + 2] 3 [/pre]

[p]In contrast, the following code specifies a string operation, the string concatenation of the string [code]'1'[/code] and the string [code]'2'[/code], because the numbers are contained in quotes: [/p]

[pre]['1' + '2'] 12 [/pre]

[p]The legacy math and string tags from Lasso Web Data Engine 3.x still perform automatic type conversions on their arguments. This ensures that existing sites will not need to be rewritten. Both of the following tags return the same result despite the fact that the parameters are specified without quotes in one and with quotes in the other: [/p]

[pre][Math_Add: 1, 2] 3
[Math_Add: '1', '2'] 3 [/pre]

[p]When a string is converted into an integer or a decimal, only a number at the beginning of the string will be converted. For example, in the following conversion only the number [code]800 [/code]from the phone number will be output. [/p]

[pre][Integer: '800-555-1212'] 800 [/pre]

[p]In earlier versions of Lasso all the numbers would have been extracted from the string yielding [code]8005551212 [/code]as the value. Existing sites may require modifications if this behavior was being counted on. [/p]

[note][b]Note: [/b]Negative literals must be surrounded by parentheses when used on the right-hand side of two-operator symbols. For example, [code](1 + (-2))[/code] or [code]($Variable == (-4))[/code]. [/note]

Mathematical Precision

[p]Mathematical symbols in Lasso 8 do not have the same rounding behavior as math tags in Lasso 3. For example, the following [code][Math_Div][/code] tag returns a result with the Lasso 8 standard of six significant digits instead of the maximum precision of its two parameters which it would have had in Lasso 3. [/p]

[pre][Math_Div: 10, 3.000] 3.333333 [/pre]

[p]In Lasso 8 the mathematical symbols perform an integer operation if both parameters of the expression are integers. For example, the following division is performed and an integer result is returned: [/p]

[pre][10 / 3] 3 [/pre]

[p]In Lasso 8 the mathematical symbols perform a decimal operation if either of the parameters of the expression are a decimal value. Decimal results are always returned with at least six significant digits. For example, the following expressions return six significant digits of the result since one of the parameters is specified with a decimal point: [/p]

[pre][10.0 / 3] 3.333333
[10 / 3.0] 3.333333 [/pre]

[p]Existing sites should be modified to use the [code][Math_Round][/code] tag or the[code] [Decimal->SetFormat] [/code]tag to format results from mathematical expressions if less than six significant digits is desired. [/p]

[p]The following example shows how to use [code][Math_Round][/code] to reduce a division expression to three significant digits: [/p]

[pre][Math_Round: (10.0 / 3.0), 1.000] 3.333 [/pre]

[p]The following example shows how to set a variable so it will always display three significant digits using the [code][Decimal->SetFormat] [/code]tag. [/p]

[pre][Variable: 'Result' = (10.0 / 3.0)]
[(Variable: 'Result')->(SetFormat: -Precision=3)]
[Variable: 'Result'] [/pre]

[pre] 3.333 [/pre]

[p]See the Math Operations chapter for more information. [/p]

Double Quotes

[p]Single quotes are preferred when specifying string literals. Double quotes are still supported, but have been deprecated. Double quotes are not guaranteed to work in the future. No changes to existing sites should be required, but all future development should use single quotes exclusively. [/p]

Restrictions

[p]Some restrictions have been removed in Lasso 8. Your site may need to be rewritten if it relied on one of these pre-defined restrictions. The following restrictions have been removed in Lasso 8: [/p]

[pre][Loop: 1000000]
[If: (Loop_Count) > 1000][Loop_Abort][/If]
… Loop Contents …
[/Loop] [/pre]

Tag Name Changes

[p]In order to promote consistency in Lasso 8 many tag names from Lasso 3 had to be changed. The following chart details the tag names which have changed. Please consult the appropriate chapters in this book for more information about each individual tag name. [/p]

[p]For the most part, these tag name changes will not require modifications to existing Lasso Web Data Engine 3.x sites. The old tag name is still supported in Lasso 8. However, support for these old tag names is deprecated. They are not guaranteed to be supported in a future version of Lasso. All new development should take place using the new tag names. [/p]

[p]Table 12: Command Tag Name Changes details the command tags which have changed in Lasso 8. Table 9: Substitution, Process, and Container Tag Name Changes details the substitution, process, and container tags which have changed in Lasso 8. [/p]

Table 3: Command Tag Name Changes

[table][tr][th]Lasso 3 Tag[/th][th]Lasso 8 Tag Equivalent[/th][th] [/th][/tr]

[tr][td]-AddError[/td][td]-ResponseAddError [/td][/tr]

[tr][td]-AddResponse[/td][td]-ResponseAdd [/td][/tr]

[tr][td]-AnyError[/td][td]-ResponseAnyError [/td][/tr]

[tr][td]-AnyResponse[/td][td]-ResponseAny [/td][/tr]

[tr][td]-ClientPassword[/td][td]-Password [/td][/tr]

[tr][td]-ClientUsername[/td][td]-Username [/td][/tr]

[tr][td]-DeleteResponse[/td][td]-ResponseDelete [/td][/tr]

[tr][td]-DoScript[/td][td]-FMScript [/td][/tr]

[tr][td]-DoScript.Post[/td][td]-FMScriptPost [/td][/tr]

[tr][td]-DoScript.Pre[/td][td]-FMScriptPre [/td][/tr]

[tr][td]-DoScript.PreSort[/td][td]-FMScriptPreSort [/td][/tr]

[tr][td]-DuplicateResponse[/td][td]-ResponseDuplicate [/td][/tr]

[tr][td]-LogicalOperator[/td][td]-OperatorLogical [/td][/tr]

[tr][td]-NoResultsError[/td][td]-ResponseNoResultsError [/td][/tr]

[tr][td]-RequiredFieldMissingError[/td][td]-ResponseRequiredFieldMissingError [/td][/tr]

[tr][td]-SecurityError[/td][td]-ResponseSecurityError [/td][/tr]

[tr][td]-UpdateError[/td][td]-ResponseUpdateError [/td][/tr]

[tr][td]-UpdateResponse[/td][td]-ResponseUpdate [/td][/tr]

[/table]

Table 4: Substitution, Process, and Container Tag Name Changes

[table][tr][th]Lasso 3 Tag[/th][th]Lasso 8 Tag Equivalent[/th][th] [/th][/tr]

[tr][td][Choice_List][/td][td][Value_List] [/td][/tr]

[tr][td][ChoiceListItem][/td][td][Value_ListItem] [/td][/tr]

[tr][td][DB_NameItem][/td][td][Database_NameItem] [/td][/tr]

[tr][td][DB_Names][/td][td][Database_Names] [/td][/tr]

[tr][td][DB_LayoutNameItem][/td][td][Database_TableNameItem] [/td][/tr]

[tr][td][DB_LayoutNames][/td][td][Database_TableNames] [/td][/tr]

[tr][td][Encode_Breaks][/td][td][Encode_Break] [/td][/tr]

[tr][td][File_LineCount][/td][td][File_GetLineCount] [/td][/tr]

[tr][td][Lasso_Abort][/td][td][Abort] [/td][/tr]

[tr][td][Lasso_Comment][/td][td][Output_None] [/td][/tr]

[tr][td][Lasso_Process][/td][td][Process] [/td][/tr]

[tr][td][Lasso_SessionID][/td][td][Lasso_UniqueID] [/td][/tr]

[tr][td][Link_Detail][/td][td][Link_DetailURL] [/td][/tr]

[tr][td][Logical_OperatorValue][/td][td][Operator_LogicalValue] [/td][/tr]

[tr][td][LoopAbort][/td][td][Loop_Abort] [/td][/tr]

[tr][td][LoopCount][/td][td][Loop_Count] [/td][/tr]

[tr][td][RandomNumber][/td][td][Math_Random] [/td][/tr]

[tr][td][RepeatingValueItem][/td][td][Repeating_ValueItem] [/td][/tr]

[tr][td][Roman][/td][td][Math_Roman] [/td][/tr]

[tr][td][SearchFieldItem][/td][td][Search_FieldItem] [/td][/tr]

[tr][td][SearchOpItem][/td][td][Search_OpItem] [/td][/tr]

[tr][td][SearchValueItem][/td][td][Search_ValueItem] [/td][/tr]

[tr][td][Shown_NextGroup][/td][td][Link_NextGroup] [/td][/tr]

[tr][td][Shown_NextGroupURL][/td][td][Link_NextGroupURL] [/td][/tr]

[tr][td][Shown_PrevGroup][/td][td][Link_PrevGroup] [/td][/tr]

[tr][td][Shown_PrevGroupURL][/td][td][Link_PrevGroupURL] [/td][/tr]

[tr][td][SortFieldItem][/td][td][Sort_FieldItem] [/td][/tr]

[tr][td][SortOrderItem][/td][td][Sort_OrderItem] [/td][/tr]

[tr][td][String_ToDecimal][/td][td][Decimal] [/td][/tr]

[tr][td][String_ToInteger][/td][td][Integer] [/td][/tr]

[tr][td][ValueListItem][/td][td][Value_ListItem] [/td][/tr]

[/table]

Unsupported Tags

[p]The following tags are no longer supported in Lasso 8. If any of these tags are used in a Web site that was built for Lasso Web Data Engine 3.x they will need to be replaced before that Web site can be served by Lasso Professional 8. Table 14: Unsupported Tags is a complete list of tags that are not supported in Lasso 8 including notes on how to update a Web site that relies on those tags for compatibility with Lasso Professional 8. [/p]

Table 5: Unsupported Tags

[table][tr][th]Lasso 3 Tag[/th][th]Notes[/th][th] [/th][/tr]

[tr][td][4D_RefreshCache][/td][td]The 4D data source module is no longer provided. [/td][/tr]

[tr][td][Apple_Event], [AE_…][/td][td]The Apple Event tags are no longer supported. [/td][/tr]

[tr][td]-DoScript.….Back[/td][td]The -DoScript tags with a Back argument are no longer supported. Use the appropriate -FMScript… tag instead. [/td][/tr]

[tr][td][Lasso_DatasourceIs4D][/td][td]The 4D data source module is no longer provided. [/td][/tr]

[tr][td][Lasso_DatasourceIsODBC][/td][td]The ODBC data source module is no longer provided. [/td][/tr]

[tr][td][Macro_…], -Macro[/td][td]All macro tags are no longer supported. See the Extending Lasso Guide for information about custom tags. [/td][/tr]

[tr][td][Post_Inline][/td][td]See the Post Inline section in this chapter for more information about how to convert [Post_Inline] calls to the [Event_Schedule] tag. [/td][/tr]

[tr][td][Relation][/td][td]The [Relation] tag was equivalent to an [Inline] that performed a search in the related table. [/td][/tr]

[tr][td]-Scripts[/td][td]This command tag only worked with the Apple Event based FileMaker Pro data source module. Use any command tag which performs a database action instead (e.g. -FindAll). [/td][/tr]

[tr][td]-Timeout[/td][td]This command tag only worked with the Apple Event based FileMaker Pro data source module. [/td][/tr]

[tr][td][Win_Exec][/td][td]This tag is no longer supported. [/td][/tr]

[/table]

CDML Compatibility

[p]Lasso Web Data Engine 3.x supported a number of CDML tags for compatibility with Web sites that were created for FileMaker Pro’s Web Companion. These tags are no longer supported in Lasso Professional 8. [/p]

Early Lasso Compatibility

[p]Lasso Web Data Engine 3.x supported a number of tags from earlier versions of Lasso for compatibility with sites that were created using the earlier versions of Lasso. These tags are no longer supported in Lasso Professional 8. [/p]

FileMaker Pro

[p]Lasso Professional 8 includes Lasso Connector for FileMaker Pro which is the equivalent of the Lasso Web Data Engine 3.x FileMaker Pro Remote data source module. The functionality of the Apple Event based FileMaker Pro data source module is no longer supported since it was Mac specific and reliant upon the use of Apple Events. [/p]

[p]If you were using the FileMaker Pro Remote data source module then no changes to your site should be required when you move the site over to Lasso Professional 8. [/p]

[p]If you were not previously using the FileMaker Pro Remote data source module, some changes may be necessary. Lasso Connector for FileMaker Pro does not support the following features of the Apple Event based FileMaker Pro data source module from Lasso Web Data Engine 3.x. [/p]

[p]However, in exchange for the omissions there are some advantages to using Lasso Connector for FileMaker Pro. [/p]

Upgrading FileMaker Pro Based Sites

[p]If a site was created using the FileMaker Remote data source module then no changes should be necessary when moving the site to Lasso Professional 8. Simply follow the instructions in the Upgrading chapter in the Lasso Professional 8 Setup Guide in order to configure Lasso Connector for FileMaker Pro to point to the appropriate FileMaker Pro Web Companion. [/p]

[p]If a site was created using the Apple Event based FileMaker Pro data source module or relied on FileMaker Pro 3.x then the following changes will need to be made in order to ensure that the site is compatible with Lasso Professional 8. [/p]

To upgrade a FileMaker Pro based site:

  1. A site that relies on FileMaker Pro 3 will need to be upgraded to FileMaker Pro 4.x or FileMaker Pro Unlimited 5.x.
  1. Configure FileMaker Pro Web Companion according to the instructions inn the Data Sources chapter of the Lasso Professional 8 Setup Guide. The Web Companion needs to be activated and all databases that are to be shared need to have their [code]Sharing…[/code] settings established.
  1. Modify any database searches that relied on the [code]-OperatorBegin [/code]and [code]-OperatorEnd[/code] command tags so that they no longer reference these tags.
  1. Modify any calls to [code]-DoScript…[/code] to call one of the new [code]-FMScript… [/code]equivalents. Any database action that relies on the [code]-Scripts [/code]command tag needs to be rewritten with a database action such as [code]-FindAll[/code].
  1. Ensure that the images stored in container fields are either GIFs or JPEGs. These images will be served directly by the Web Companion.